<?php
class Application_Model_Admin extends Zend_Db_Table_Abstract{
    protected $_name = 'admin';

    public function verifyLogin($email, $password){
        $salt = Zend_Registry::get('salt');
        $password = md5($salt.$password);
        $admin = new Application_Model_Admin();

        $select = $admin->select()
                        ->from($this->_name, array('id', 'nombre', 'email'))
                        ->where("status = 'A' ")
                        ->where("email = ? ", $email)
                        ->where("password = ? ", $password);

        $result = $admin->fetchRow($select);

        if($result){
            return $result;
        }

        return false;
    }
}